package cn.wolfcode.luowowo.article.service.impl;

import cn.wolfcode.luowowo.article.domain.Theme;
import cn.wolfcode.luowowo.article.mapper.ThemeMapper;
import cn.wolfcode.luowowo.article.service.IThemeService;
import com.alibaba.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.ArrayList;
import java.util.List;


@Service
public class ThemeServiceImpl implements IThemeService {

    @Autowired
    private ThemeMapper themeMapper;

    @Override
    public List<Theme> list() {
        List<Theme> themes = themeMapper.selectAll();
        List<Theme> list = new ArrayList<>();
        for (Theme theme : themes) {
            if(theme.getId()!=1){
                list.add(theme);
            }
        }
        return list;
    }
}
